Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set challenge attribution #164

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Set challenge attribution #164

merged 3 commits into from
Nov 26, 2024

Conversation

fuyu0425
Copy link
Contributor

Hello CTFd team,
ctfcli does not load attribution field from yml files.
Here is the patch to add it.

@ColdHeat
Copy link
Member

This looks like the right idea but it looks like you're faling some tests.

The upload issue is related to the deprecation of a Github action will I will tackle

@fuyu0425
Copy link
Contributor Author

I have modified and added related tests.

for key in copy_keys:
if key in challenge_data:
challenge[key] = challenge_data[key]

challenge["description"] = challenge_data["description"].strip().replace("\r\n", "\n").replace("\t", "")
challenge["attribution"] = challenge_data["attribution"].strip().replace("\r\n", "\n").replace("\t", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this behave if the server doesn't have the attribution field? I feel like it would error when trying to access the attribution field.

@ColdHeat ColdHeat merged commit 763c2de into CTFd:master Nov 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants